home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / 422mods.zip / TFC003A.422 < prev    next >
Text File  |  1993-01-31  |  9KB  |  290 lines

  1. TFC003A - The Complete Clear Screen Mod for 4.22
  2. Nightshade #1 @16975
  3. Thu Jan 28 11:07:56 1993
  4. ┌──────────────────────────────────────────────────────────────────────┐
  5. │ Mod Name:    :  TFC003A.MOD        Author :  The Flying Chicken      │
  6. │ Difficulty   :  Easy               Update :  Nightshade              │
  7. │ WWIV Version :  4.22               Date   :  1/28/93                 │
  8. └──────────────────────────────────────────────────────────────────────┘
  9.  
  10. TFC003.MOD - The Complete Clear Screen Mod
  11. Author: The Flying Chicken 1@12456 (WWIVLink)
  12. Updated by:  Nightshade 1@6953 (WWIVnet) 1@16975 (WWIVlink)
  13.  
  14.  
  15.     The Flying Chicken originally published this mod for WWIV v4.20.
  16.     I enjoyed, an appriciated this, so much, I through it into my
  17.     4.21, 4.21a, and now, 4.22 source.  I didn't know if he was going
  18.     to be updating it, so I went ahead and did it.  (TFC - I hope you
  19.     don't mind).
  20.  
  21.     The code is his.  I updated a few things, to make it 4.22 compatible.
  22.     I've also included his original documention.
  23.  
  24.                         Nightshade                                                Nightshade
  25.  
  26.  
  27. Start TFC text:
  28.  
  29.     I know that there are about four hundred versions of this mod,
  30.     but none of them were complete in my eyes, so I've decided
  31.     to release the one I use.  This mod will allow you to clear
  32.     the screen before reading each message or e-mail, and also
  33.     before writing messages or e-mail.  Also, an option will be
  34.     added to the defaults section so you can toggle this option
  35.     on and off.  And finally, newusers will be asked if the
  36.     want the clear screen feature.
  37.  
  38.     One final note, Wayne evidentally was planning on using
  39.     this feature since there is a variable set up for it, but it
  40.     isn't used yet, so we will just save Wayne some work.
  41.  
  42.  
  43.     Before using this or any mod, back up your source !!!!!
  44.  
  45.                 PKZIP source *.c *.h *.mak
  46.  
  47.  
  48.     1. Search for void inmsg(), scroll down some, and make
  49.        the changes shown.  This will clear the screen before posting a
  50.        message.  I put this in at first, but then didn't like it, so
  51.        if you don't want this feature, just skip to step 2.
  52.  
  53.   nl();
  54.   helpl=6;
  55.   if ((thisuser.sysstatus & sysstatus_clr_scrn) && (!fsed))     /* ADD */
  56.     outchr(12);                                                 /* ADD */
  57.   if (okansi()) {
  58.     prt(2,get_string(326));
  59.     mpl(60);
  60.     inputl(title,60);
  61.   } else {
  62.     pl(get_string(626));
  63.     outstr(get_string(326));
  64.     inputl(title,60);
  65.   }
  66.  
  67.  
  68.     2. Load up MSGBASE.C and search for void read_message() and
  69.        make the following changes.
  70.  
  71. void read_message(int n, int *next, int *val)
  72. {
  73.   char s[100],s1[80];
  74.   postrec p;
  75.   int abort,a,nn;
  76.   slrec ss;
  77.  
  78.   nl();                            /* Delete this line */
  79.   abort=0;
  80.   *next=0;
  81.   if (thisuser.sysstatus & sysstatus_clr_scrn)      /* ADD */
  82.     outchr(12);                                     /* ADD */
  83.   else                                              /* ADD */
  84.     nl();                                           /* ADD */
  85.   sprintf(s,"%u/%u: ",n,nummsgs);
  86.   osan(s,&abort,next);
  87.   ansic(MSG_COLOR);
  88.   p=msgs[n];
  89.  
  90.  
  91.     3. Save MSGBASE.C.
  92.     4. Load MSGBASE1.C.  Search for void readmail().  Scroll down
  93.        a little farther, and make the following changes.
  94.  
  95.     i=atoi(s);
  96.     if (i)
  97.       if (i<=mw)
  98.         curmail=i-1;
  99.       else
  100.         curmail=0;
  101.     else
  102.       curmail=0;
  103.   }
  104.   done=0;
  105.   do {
  106.     if (thisuser.sysstatus & sysstatus_clr_scrn)        /* ADD */
  107.         outchr(12);                                     /* ADD */
  108.     else                                                /* ADD */
  109.         nl();nl();                                      /* ADD */
  110.     sprintf(s,"(%u/%u): ",curmail+1,mw);
  111.     abort=0;
  112.     nl();                                           /* DELETE THIS LINE */
  113.     nl();                                           /* DELETE THIS LINE */
  114.     osan(s,&abort,&next);
  115.     next=0;
  116.     ansic(MSG_COLOR);
  117.  
  118.  
  119.     5. Save MSGBASE1.C.
  120.     6. Load DEFAULTS.C.  Search for print_cur_stat() and make the
  121.        following changes.  Because of 4.22's removal of strings, I've
  122.        removed the strings from the code.  The string numbers refer to
  123.        the string numbers in my code (I will provide the text).
  124.        If you wish to change the numbers, feel free.
  125.  
  126.     outstr(get_string(399)); npr("%s\r\n",
  127.       (thisuser.sysstatus & sysstatus_funky_colors)?str_yes:str_no);
  128.   }
  129.   outstr(get_string(400)); npr("%d\r\n",thisuser.optional_val);
  130.   outstr(get_string(1510)); npr("%s\r\n",                  /* ADD */
  131.     (thisuser.sysstatus & sysstatus_clr_scrn)?str_yes:str_no);    /* ADD */
  132.  
  133. /* String to add:  1510  "C. Clear Screen      : " */
  134.  
  135.   outstr(get_string(401));
  136.   if (thisuser.wwiv_regnum)
  137.     npr("%ld\r\n",thisuser.wwiv_regnum);
  138.   else
  139.     pl(get_string(402));
  140.   pl(get_string(403));
  141.  
  142.  
  143.     7. Search for void defaults() and make the following changes.
  144.  
  145. void defaults()
  146. {
  147.   int i,i1,i2,done;
  148.   char s[81],s1[81],s2[81],ch;
  149.  
  150.   done=0;
  151.   print_cur_stat();
  152.   do {
  153.     tleft(1);
  154.     if (hangup)
  155.       return;
  156.     nl();
  157.     helpl=4;
  158.     if (okansi()) {
  159.       prt(2,get_string(477));             /* Edit line 477, and add C */
  160.       ch=onek("Q?123456789ABCW");         /* Add C to this line */
  161.     } else {
  162.       prt(2,get_string(478));         /* Edit line 478, and add C */
  163.       ch=onek("Q?1234567BCW");          /* Add C to this line */
  164.     }
  165.  
  166.  
  167.     8.  Scroll down a little farther and make the changes.
  168.  
  169.       case 'B':
  170.         optional_lines();
  171.         break;
  172.       case 'C':                                             /* ADD */
  173.         if (thisuser.sysstatus & sysstatus_clr_scrn)        /* ADD */
  174.             thisuser.sysstatus ^= sysstatus_clr_scrn;       /* ADD */
  175.         nl();                                               /* ADD */
  176.     prt(5,gets_string(1511));                    /* ADD */
  177.  
  178. /* String to add:  1511 "Clear screen before each message? */
  179.  
  180.     if (yn())                                           /* ADD */
  181.         thisuser.sysstatus |= sysstatus_clr_scrn;       /* ADD */
  182.     break;                                              /* ADD */
  183.       case 'W':
  184.         enter_regnum();
  185.         break;
  186.  
  187.  
  188.     9. Save DEFAULTS.C.
  189.     10. Load NEWUSER.C.  Search for void newuser() and add the following
  190.         function right before it.
  191.  
  192. void input_clr_scrn()                       /* ADD ENTIRE VOID */
  193. {
  194.     if (thisuser.sysstatus & sysstatus_clr_scrn)
  195.         thisuser.sysstatus ^= sysstatus_clr_scrn;
  196.     nl();
  197.     prt(5,get_string(1511));
  198.     if (yn())
  199.         thisuser.sysstatus |= sysstatus_clr_scrn;
  200.  
  201. }
  202.  
  203.  
  204.     11. Now search for void newuser(), scroll down a few pages,
  205.         and make the changes shown.
  206.  
  207.     if (numed && (thisuser.sysstatus & sysstatus_ansi)) {
  208.       nl();
  209.       prt(5,get_string(568));
  210.       if (yn())
  211.         select_editor();
  212.     }
  213.  
  214. #ifdef TFC003
  215.     input_clr_scrn();                                   /* ADD */
  216. #endif
  217.     prt(5,get_string(569));
  218.     if (yn()) {
  219.       nl();
  220.       pl(get_string(570));
  221.  
  222.  
  223.     12. Scroll a little down, and make the following changes...
  224.  
  225.         outstr(get_string(585)); pl(thisuser.country);
  226.         outstr(get_string(586)); pl(thisuser.zipcode);
  227.         outstr(get_string(587)); pl(thisuser.dataphone);
  228.       }
  229.       outstr(get_string(1512)); npr("%s\r\n",
  230.     (thisuser.sysstatus & sysstatus_clr_scrn)?str_yes:str_no);
  231.  
  232. /* String to add:  1512 "G. Clear Screen  : "
  233.  
  234.       nl();
  235.       pl(get_string(588));
  236.       nl();
  237.       nl();
  238.       if (syscfg.sysconfig & sysconfig_extended_info) {
  239.     prt(2,get_string(589));                   /* Edit line 590, add G */
  240.     ch=onek("Q123456789ABCDEFG");             /* Add G to line */
  241.       } else {
  242.     prt(2,get_string(590));                   /* Edit line 590, add G */
  243.     ch=onek("Q123456789G");              /* Add G to line */
  244.       }
  245.       ok=0;
  246.       switch(ch) {
  247.         case 'Q': ok=1; break;
  248.         case '1': input_name(); break;
  249.  
  250.  
  251.     13. Last change...
  252.  
  253.         case 'E': input_zipcode(); break;
  254.         case 'F': input_dataphone(); break;
  255.     case 'G': input_clr_screen(); break;
  256.       }
  257.     } while ((!ok) && (!hangup));
  258.  
  259.  
  260.     Well, that's it.  Easy huh.  Compile the code, and yer off!
  261.  
  262.     As usual, I don't make any claims with this mod, I am simply
  263.     releasing it to help you out.  I will NOT be responsible for
  264.     anything other than good results.
  265.  
  266.     It is not my fault if this mod doesn't work, however if you
  267.     can explain in detail the problem you are having, I will try
  268.     to help you correct it.  Make sure you notify me so I can
  269.     correct the mod in future releases.
  270.  
  271.     It is defintely not my fault if you install this mod, it doesn't
  272.     work, and you didn't back up your source.  Your just sh*t out
  273.     of luck.
  274.  
  275.     If you use this mod, drop me a note and tell me how wonderful
  276.     you are, and if you feel like it, how wonderful I am.  But
  277.     drop me a note.
  278.  
  279.     If you have any ideas for new mods, or would like some more
  280.     information about this one, please e-mail me at the following
  281.     address.
  282.  
  283.  
  284.                    The Flying Chicken  1@12456 (WWIV Link)
  285.                             The Insane Asylum BBS
  286.  
  287.  
  288.  
  289.                              --- END OF LINE ---
  290.